Broken FEEC projections on polar domains - #576
Conversation
…into polar_splines_alisa
- Remove polar_mapping and use_logical_sol options - Change the analytical solution - Avoid Laplacian() for right hand side - Add disk radius as parse argument
Yes, it was because the two projections are the same. I added your suggestion in 5ecf431. Do we also need to add |
Yes, in principle we should test the new class, too. This would be an insurance against future changes to the class. I think we could simply add parametrization to |
Done in 0c0eae0 |
- Move parser definition to a separate function 'parse_input_arguments'; - Import matplotlib and psydac modules in the functions that actually use them.
- Import matplotlib and sympde modules in the functions that actually use them; - Whenever possible, also import sympy and psydac modules in the functions that actually use them.
This allows the correct visualization of the images on the screen of a 14-inch laptop.
…into polar_splines_alisa
- This is in a new module `psydac.utilities.parallel_utils`; - It is now used in the scripts `poisson_2d.py` and `maxwell_2d.py` in `psydac/feec/polar/examples/`.
…into polar_splines_alisa
| M1 = (htheta * hs) * (I1 - P1.T) @ (I1 - P1) + P1.T @ M1_raw @ P1 | ||
| M2 = (htheta * hs) * (I2 - P2.T) @ (I2 - P2) + P2.T @ M2_raw @ P2 | ||
|
|
||
| Pi0, Pi1, Pi2 = derham_h.projectors(nquads=[degree[0] + 10, degree[1] + 10]) |
There was a problem hiding this comment.
Hi there, I would like to reopen this conversation 😉
This is an example script where we choose the manufactured solution, not a situation where the user can choose an arbitrary function. In any case, even if the solution were more oscillatory, a standard approach would be to increase the number of cells and the spline degree.
Please consider that increasing nquads slows down the matrix assembly a lot. Luckily this is only a 2D example which we do not run with a high number of cells.. but in 3D we would notice a big difference.
In conclusion, I feel that the default number of quadrature points per cell (in each direction) of degree + 1 is appropriate in most cases. Here I would not increase nquads unless strictly necessary.
Co-authored-by: Yaman Güçlü <yaman.guclu@gmail.com>
I see, thanks! f99f5e4 |
Implement broken FEEC projections for C0 and C1 sequences in 2D (conga_projections.py). The formulas for the projections can be found on pages 19-23 of the arXiv preprint https://arxiv.org/pdf/2505.15996.
Main additions
psydac.feec.polar.conga_projections.LinearOperatorsubclassesC0PolarProjection_V0/1/2acting on the coefficients of scalar- or vector-valued tensor-product splines defined on the logical domain. The tensor-product splines are projected onto the subspacesLinearOperatorsubclassesC1PolarProjection_U0/1/2acting on the coefficients of scalar- or vector-valued tensor-product splines defined on the logical domain. The tensor-product splines are projected onto the subspacesdotmethods of the new projection operators correctly execute in parallel for arbitrary domain decompositions in both the angular and radial dimensions.tosparsemethods against reference matrix operatorsdotandtosparsemethodspsydac/feec/polar/examples/poisson_2d.pypsydac/feec/polar/examples/maxwell_2d.pyFurther changes
Additional info
Example of run:
mpirun -n 2 python poisson_2d.py -S -n 16 24 -d 2 2 -t disk -D 0.2 -m 'C0conga'Exact solution, approximate solution and error plot:
Example of run:
mpirun -n 2 python maxwell_2d.py -S -n 16 20 -d 2 2 -T 1 -D 0.2 -s 1Plot of exact solution and approximate solution at final time T = 1:
TODO
C1PolarProjection_V2and test itC1PolarProjection_V0/1/2toC1PolarProjection_U0/1/2(i.e. replaceVwithU)sympy.lambdifywithpyccel.lambdify